import book.Book;
import book.BookList;
import user.User;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: XMQ
 * Date: 2022-05-19
 * Time: 9:53
 */
//博客代码
public class Main {

    public static User login(){
        System.out.println("请输入你的用户名：");
        Scanner scanner = new Scanner(System.in);
        String name = scanner.nextLine();
        System.out.println("hello "+name +" 欢迎来到图书管理系统");
        return new User(name);

    }
    public static void main(String[] args) {
        //全部整合到一起
        BookList bookList = new BookList();//准备图书

        //登录菜单
        User user = login();
        while(true){
            int choice = user.menu();
            //对书架进行管理员选择的操作
            user.doOpeartion(choice,bookList);
        }
    }
}
